# -*- coding:utf-8 -*-

from sqlalchemy import Column, ForeignKey, Numeric, DateTime, String
from config.database import BaseMixin, Base, BaseStock


class Daily(Base, BaseStock):
    __tablename__ = "daily"

    amount = Column(Numeric, comment='成交额 （千元）')

    change = Column(Numeric, comment='涨跌额')

    close = Column(Numeric, comment='收盘价')

    high = Column(Numeric, comment='最高价')

    low = Column(Numeric, comment='最低价')

    open = Column(Numeric, comment='开盘价')

    pct_chg = Column(Numeric, comment='涨跌幅 【基于除权后的昨收计算的涨跌幅：（今收-除权昨收）/除权昨收 】')

    pre_close = Column(Numeric, comment='昨收价【除权价，前复权】')

    trade_date = Column(DateTime, comment='交易日期')

    ts_code = Column(String(20), nullable=False, comment='股票代码')

    vol = Column(Numeric, comment='成交量 （手）')

